The present invention is related generally to the field of computer graphics, and more particularly, a system and method for resampling graphics data of a source image to produce a destination image.
As visual output devices, such as computer monitors, printers, and the like, of various sizes and resolutions have been developed, and the demand for them have increased, the ability for a graphics processing system to resize and resample source images and create destination images to take advantage of the various sized and available resolutions of devices is a desirable operation. In an electronic display system, color at each pixel is typically represented by a set of color components, and each color component is represented by a sample value. Color components such as red, green, blue (RGB) or other representations such as YCbCr are well known in the art. Whichever representation is chosen, each color component can be interpreted as a two dimensional array of samples, so three such arrays can represent images on display systems. Conceptually, resampling can be viewed as a spatial process, working on discrete input samples, represented by pixels of the source image arranged in a two-dimensional bitmap. The output samples of the destination image are spatially located at fractional sample positions within the input sample grid.
The resulting destination image, however, should retain an acceptable image quality with respect to the source image. That is, the destination image should appear to retain similar visual qualities of the source image, such as having nearly the same color balance, contrast, and brightness as the original source image. Otherwise, rather than accurately reproducing a resized graphics image of the source image, the rescaling operation will compromise image quality by introducing image distortion. To this end, various interpolation and filtering circuits and methods have been developed in order to create high quality destination graphics images.
In many conventional filtering algorithms where the resolution of a source image is reduced, a plurality of source samples are combined to yield a destination sample value. The method by which the source sample values are combined can be rather complicated. For example, the contribution of each of the source samples is typically weighted such that source samples that are more distant from the location of the destination relative to the position of the source samples contribute less to the resulting destination sample value. Moreover, the algorithm applied to combine the source sample values may include linear and non-linear models. Additionally, the number of source samples that are used in calculating the resulting destination value affects the quality of the resulting resized image.
Implementation of these conventional filtering algorithms generally require additional circuitry to be included in the graphics processing system to facilitate the filtering operation. The space consumed by such additional circuitry may also depend on the number of source samples used in calculating the destination value, that is, the number of xe2x80x9ctapsxe2x80x9d required to sample the source sample values. The more taps filter circuitry requires, the more complicated the circuitry becomes and the more space that is necessary to accommodate the circuitry. Although dedicated filtering circuitry improves processing throughput, where space is limited or miniature device size is desired, the inclusion of the additional dedicated filtering circuitry may not be an acceptable alternative. An alternative approach to implementing conventional multi-sample filtering algorithms is to include minimal additional dedicated filtering circuitry, but repeat certain processes through the same circuitry to yield a final output destination value. In effect, performance of the filtering operation requires multiple passes through the filtering circuitry. Although the space consumed by the circuitry is minimized, graphics processing throughput may suffer because of the bottleneck the multiple pass filtering process creates.
Therefore, there is a need for an alternative system and method for implementing a multi-tap filter in a graphics processing system.
The present invention relates to a system and method for calculating an output value from a plurality of input sample values. Each of the input sample values contributing to the output value according to a respective weight value. A first intermediate value is interpolated for a first offset value from a first plurality of the input sample values and a second intermediate value is interpolated for a second offset value from a second plurality of the input sample values. The offset values are representative of the weight values of the input samples of the respective plurality of the input samples. The first and second intermediate values are combined to produce a resultant value which is subsequently blended with the remaining input sample values of the plurality in accordance with respective scaling values assigned to the resultant value and the remaining input sample values. The